package com.yunji.news.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 缴费记录实体类
 *
 * @author yunji
 * @since 2024-11-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("payment_records")
public class PaymentRecord {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("application_id")
    private Long applicationId;

    @TableField("student_name")
    private String studentName;

    @TableField("id_card")
    private String idCard;

    @TableField("school_id")
    private Long schoolId;

    @TableField("major_id")
    private Long majorId;

    @TableField("payment_type")
    private String paymentType;

    @TableField("amount")
    private BigDecimal amount;

    @TableField("payment_method")
    private String paymentMethod;

    @TableField("payment_status")
    private String paymentStatus;

    @TableField("payment_time")
    private LocalDateTime paymentTime;

    @TableField("transaction_id")
    private String transactionId;

    @TableField("receipt_url")
    private String receiptUrl;

    @TableField("refund_status")
    private String refundStatus;

    @TableField("refund_time")
    private LocalDateTime refundTime;

    @TableField("refund_amount")
    private BigDecimal refundAmount;

    @TableField("remark")
    private String remark;

    @TableField("status")
    private Integer status;

    @TableLogic
    @TableField("deleted")
    private Integer deleted;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}